From: Adrian Bunk Date: Sun, 12 Sep 2021 19:05:23 +0000 (+0300) Subject: bnx2x: Fix enabling network interfaces without VFs X-Git-Tag: archive/raspbian/5.14.6-2+rpi1^2~27 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=568a1f63b24ab2c5bbde3251be26fcdd1c1fd107;p=linux.git bnx2x: Fix enabling network interfaces without VFs Origin: https://git.kernel.org/linus/52ce14c134a003fee03d8fc57442c05a55b53715 Bug-Debian: https://bugs.debian.org/993948 This function is called to enable SR-IOV when available, not enabling interfaces without VFs was a regression. Fixes: 65161c35554f ("bnx2x: Fix missing error code in bnx2x_iov_init_one()") Signed-off-by: Adrian Bunk Reported-by: YunQiang Su Tested-by: YunQiang Su Cc: stable@vger.kernel.org Acked-by: Shai Malin Link: https://lore.kernel.org/r/20210912190523.27991-1-bunk@kernel.org Signed-off-by: Jakub Kicinski Gbp-Pq: Topic bugfix/all Gbp-Pq: Name bnx2x-Fix-enabling-network-interfaces-without-VFs.patch --- diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c index 27943b0446c..a207c36246b 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c @@ -1224,7 +1224,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, /* SR-IOV capability was enabled but there are no VFs*/ if (iov->total == 0) { - err = -EINVAL; + err = 0; goto failed; }